<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .menu {
            width: 200px;
            border: 1px solid red;
        }

        .menu .header {
            background-color: pink;
            padding: 20px;
        }

    </style>


</head>
<body>

<div class="menu">
    <div class="header" onclick="myFunc()">标题</div>
    <div class="item">内容</div>

</div>

<script type="text/javascript">
    function myFunc(){
        confirm("是否继续??")
    }
</script>

</body>
</html>